package com.iwuke.dance.wallet;

import android.view.View;
import android.widget.TextView;

import com.iwuke.dance.R;
import com.iwuke.dance.activity.BaseActivity;
import com.iwuke.dance.gadget_view.TitleBarView;
import com.iwuke.dance.util.Util;
import com.iwuke.dance.util.merchants_connect.NetworkEvent;
import com.iwuke.dance.wallet.identity_information.VerifyMobileNumberActivity;

import de.greenrobot.event.Subscribe;
import de.greenrobot.event.ThreadMode;

/**
 * @author: 魏从响
 * @date: 2025/9/12
 * 开通钱包
 */
public class OpenWalletActivity extends BaseActivity implements View.OnClickListener {

    private TitleBarView title_bar;
    private TextView button_open_wallet;

    /**
     * @description 网络实时监听
     */
    @Subscribe(threadMode = ThreadMode.MainThread)
    public void onEvent(NetworkEvent networkEvent){
        BaseActivity.setConnect(OpenWalletActivity.this,networkEvent,title_bar);

    }

    @Override
    protected int getView() {
        return R.layout.activity_open_wallet;
    }

    @Override
    protected void init(View mView) {

        title_bar = findViewById(R.id.title_bar);
        button_open_wallet = findViewById(R.id.button_open_wallet);



        title_bar.setLeftOnClick(this);
        button_open_wallet.setOnClickListener(this);

    }

    @Override
    protected void initData() {

//        //动图
//        ImageView img_bg = findViewById(R.id.img_bg);
//        GlideUtil.setGif(OpenWalletActivity.this,R.drawable.img_111,img_bg);
//
//        //视频
//        VideoView videoView = (VideoView) findViewById(R.id.videoView);
//        MediaController mediaController = new MediaController(this);
//        String uri = "android.resource://" + getPackageName() + "/" + R.raw.video;
//        videoView.setVideoURI(Uri.parse(uri));
//        videoView.setMediaController(mediaController);
//        mediaController.setMediaPlayer(videoView);
//        videoView.requestFocus();
//        videoView.start();
    }

    @Override
    public void onClick(View v) {
        if (v.getId()==R.id.img_left){
            finish();
        }else if (v.getId()==R.id.button_open_wallet){
            Util.setIntent(OpenWalletActivity.this, VerifyMobileNumberActivity.class);
            finish();
        }
//        switch (v.getId()){
//            case R.id.img_left:
//                finish();
//                break;
//
//            case R.id.button_open_wallet:
////                Util.setIntent(OpenWalletActivity.this,);
//                break;
//
//        }
    }
}
